home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / demo / medit.zip / MAINFRM.CPP < prev    next >
C/C++ Source or Header  |  1994-06-23  |  1KB  |  44 lines

  1. #include "stdafx.h"
  2. #include "magmaed.hpp"
  3. #include "multipad.h"
  4. #include "mainfrm.h"
  5.  
  6.  
  7. IMPLEMENT_DYNCREATE(CMainFrame, CMDIFrameWnd)
  8. BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
  9.     //{{AFX_MSG_MAP(CMainFrame)
  10.     ON_WM_CREATE()
  11.     //}}AFX_MSG_MAP
  12. END_MESSAGE_MAP()
  13.  
  14. static UINT buttons[] =
  15. {
  16.   ID_FILE_NEW, ID_FILE_OPEN, ID_FILE_SAVE, ID_SEPARATOR,
  17.   ID_EDIT_CUT, ID_EDIT_COPY, ID_EDIT_PASTE, ID_SEPARATOR,
  18.   ID_FILE_PRINT, ID_APP_ABOUT
  19. };
  20.  
  21. static UINT indicators[] =
  22. {
  23.   ID_SEPARATOR,
  24.   ID_INDICATOR_CAPS, 
  25.   ID_INDICATOR_NUM, 
  26.   ID_INDICATOR_SCRL,
  27.   ID_INDICATOR_OVR,  
  28.   ID_INDICATOR_COL,
  29.   ID_INDICATOR_CURRLINE,  
  30.   ID_INDICATOR_NUMLINES,
  31. };
  32.  
  33. int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
  34. {
  35.   CMDIFrameWnd::OnCreate(lpCreateStruct);
  36.   return ((m_ToolBar.Create(this) &&
  37.            m_ToolBar.LoadBitmap(IDR_MAINFRAME) &&
  38.            m_ToolBar.SetButtons(buttons, sizeof(buttons)/sizeof(UINT)) &&
  39.            m_StatusBar.Create(this) &&
  40.            m_StatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
  41.            ? 0 : -1);
  42. }
  43.  
  44.